package com.pkche.core.advanced.util.weixin;

import java.util.HashMap;
import java.util.Map;

import org.codehaus.jettison.json.JSONObject;


/**
 * 文本消息
 * @author yangqiang
 *
 */
public class TextMessage extends BaseMessage {
	// 回复的消息内容  
    private String Content;  
  
    public String getContent() {  
        return Content;  
    }  
  
    public void setContent(String content) {  
        Content = content;  
    }

    /**
     * 转换成客服消息Json
     * @return
     */
    public String toRespJson(){
    	Map<String,Object> m = new HashMap<String, Object>();
		m.put("touser", getToUserName());
		m.put("msgtype", MessageUtil.RESP_MESSAGE_TYPE_TEXT);
		Map<String,String> text = new HashMap<String, String>();
		text.put("content", this.Content);
		m.put("text", text);
		JSONObject json = new JSONObject(m);
		return  json.toString();
    }
    
    

}
